1. Field of the Invention
The present invention relates to an apparatus and method for use in a computer system in which a plurality of application programs are executed, and more particularly to an apparatus and method for arbitrating a contention caused when the plurality of application programs simultaneously attempt to access an access target.
2. Description of the Background Art
In general, an application program executed in a computer system controls operations of a plurality of physical devices, such as loudspeakers, musical instruments digital interface (MIDI) devices, and sound digital signal processor (SDSP) devices, thereby controlling the operation of the entire computer system so as to perform a desired process. In a computer system in which a plurality of application programs are executed, however, when two or more application programs simultaneously access one physical device, a contention occurs between access requests. On the occurrence of the contention between access requests, that one physical device does not operate in a desired manner.
Hereinafter, the term “contention” refers to such a state as described above in which two or more application programs simultaneously attempt to access one physical device. When a contention occurs, application programs are not able to control the operation of the computer system in a desired manner. Accordingly, in the computer system in which the plurality of application programs are executed, it is necessary to control access requests from application programs to a physical device so as not to cause the occurrence of the contention. Hereinafter, the term “contention arbitration” refers to the control of access requests from application programs to a physical device. Conventionally, a variety of methods for contention arbitration have been proposed.
For example, there is a proposed method for content arbitration which uses exclusive control identifiers (see, for example, Japanese Patent Laid-Open Publication No. 2002-175287). In this method, the exclusive control identifiers are assigned to computing devices for executing application programs. When one application program accesses a shared physical device, a computing device, which executes the application program, collects exclusive control identifiers assigned to other computing devices. After collecting all the exclusive control identifiers, the computing device acquires exclusive control right to access the shared physical device.
There is another proposed method for content arbitration which arbitrates an access contention caused when a plurality of threads successively request to access data or object stored in a computer system (see, for example, Japanese Patent Laid-Open Publication No. 10-187527). In this method, the access contention is arbitrated based on a first-in, first-out process.
There is still another proposed method for content arbitration which uses a control device dedicated to contention arbitration in a computer system (see, for example, Japanese Patent Laid-Open Publication No. 2000-231458). In this method, the control device conducts the contention arbitration based on priorities assigned to access requests.
There is still another proposed method for content arbitration in which when a plurality of control commands are given to a device to be controlled, the device selects any one of the control commands based on a prescribed condition to arbitrate an access contention (see, for example, Japanese Patent Laid-Open Publication No. 2001-346276).
In the above-described conventional methods for contention arbitration, the contention arbitration is conducted for each physical device actually present in the computer system. Accordingly, in the case where the conventional methods are used for arbitrating an access contention, for example, in a physical device which can be simultaneously accessed by a plurality of application programs under a specific condition, or in a physical device which allows simultaneous accesses from a prescribed number of application programs, the advantages of such physical devices are not fully utilized.
Further, in the case where the above-described conventional methods are used for arbitrating an access contention in a physical device, such as a loudspeaker, which is connected to another physical device and does not have its own I/O port, when such a physical device is shared between a plurality of physical devices, an application program refers to a state transition table to determine not to access the physical device accessed by another application program, thereby avoiding the access contention. As a result, the contention arbitration depends on how the application program operates or how the physical devices are connected to each other. Further, an increase of the number of physical devices necessitates each application program to update the state transition table, making it difficult to conduct the contention arbitration.
As described above, the conventional methods for contention arbitration cannot fully utilize the advantages of physical devices, and cannot be flexibly adapted to a change of the physical devices.